Replication Data for: "No causal effect of school closures in Japan on the spread of COVID-19 in spring 2020"
Kentaro Fukumoto, Charles T. McClean, and Kuninori Nakagawa
Nature Medicine. 2021. https://doi.org/10.1038/s41591-021-01571-8
October 28, 2021

[Description]

Among tool kits to combat the coronavirus disease 2019 (COVID-19), caused by severe acute respiratory syndrome coronavirus 2, school closures are one of the most frequent non-pharmaceutical interventions. However, school closures bring about substantial costs, such as learning loss. To date, studies have not reached a consensus about the effectiveness of these policies at mitigating community transmission, partly because they lack rigorous causal inference. Here we assess the causal effect of school closures in Japan on reducing the spread of COVID-19 in spring 2020. By matching each municipality with open schools to a municipality with closed schools that is the most similar in terms of potential confounders, we can estimate how many cases the municipality with open schools would have had if it had closed its schools. We do not find any evidence that school closures in Japan reduced the spread of COVID-19. Our null results suggest that policies on school closures should be reexamined given the potential negative consequences for children and parents. 

[About data]

This study deals with eight treatment variables on March 4, 16, April 6, 10, 16, 22, May 11, and June 1, 2020. All data except the four surveys from the Japanese Ministry of Education (treatment variables on April 16, 22, May 11, and June 1) are obtained from public sources. Permission from the Japanese Ministry of Education is necessary for the use of their four surveys. Accordingly, this replication data contains only the dataset and R scripts which reproduce results for the other four treatment variables (on March 4, 16, April 6, and  10). For details, see Methods.

[Program]

R (version 4.0.3)

[Additional programs required]

tidyverse (version 1.3.1)
checkpoint (version 0.4.10)
MatchIt (version 4.1.0)
Matching (version 4.9-9)
rgenoud (version 5.8-3.0)
lmtest (version 0.9-38)
sandwich (version 3.0-1)
lfe (version 2.8-3)
MASS (version 7.3-53)
CBPS (version 0.22)
WeightIt (version 0.11.0)
survey (version 4.0)
cobalt (version 4.3.1)

[Process of replication]

Run matching.R to reproduce Fig. 1. The file loads the results of matching, matching_results/alt_atc_XXXX_1000_1000.RDS to save time instead of implementing matching, which takes almost a week. If you want to implement matching by yourself, run do.R. 
Run covs.R to reproduce Fig. 2. 
Run fe.R to reproduce Fig. 3.
Run neighbor.R to reproduce Fig. 4. The file loads the results of matching, neighbor/results/neighbor_atc_XXXX_1000_1000.RDS to save time instead of implementing matching, which takes almost a week. If you want to implement matching by yourself, run do_neighbor.R.
Run att.R to reproduce Fig. 5. The file loads the results of matching, matching_results/alt_att_0406_1000_1000.RDS to save time instead of implementing matching, which takes almost a day. If you want to implement matching by yourself, run do.R. 
Run nb.R to reproduce Extended Data Fig. 3.
Run ipw.R to reproduce Extended Data Fig. 4. The file calls ipw/ipw.XXXX.R where we comment out scripts to estimate propensity scores and instead load the results to save time (ll. 17-47). 
Run sensitivity.R to reproduce Extended Data Fig. 5. The file loads the results of matching, sensitivity/small_atc_XXXX_1000_1000.RDS to save time instead of implementing matching, which takes almost a week. If you want to implement matching by yourself, run do_small.R.
Run supplement.r to reproduce Tables 1, S2-S5, Figures S2 and S3, and numbers mentioned in Supplementary Information, Main analysis section.
Run count.r to reproduce Tables S6 and S7 and Figure S4.
Run missing.r to reproduce Tables S8-S10 and Figure S5.
Run number.of.schools.r to calculate the average numbers of elementary and junior high schools per municipality, respectively (Main Text, Results section, Data subsection).

[Most recent date of successful replication]

September 30, 2021